package com.yl.chainStore.mapper.sick;

import com.yl.chainStore.entity.sick.SickMedicalRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.yl.chainStore.pojo.vo.sick.SickMedicalRecordsSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 客户就诊记录 Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-07-26
 */
@Mapper
interface SickMedicalRecordsMapper : BaseMapper<SickMedicalRecords>{

	/**
	 * 分页
	 */
	fun getRecordsPage(
		@Param("page")page: Page<SickMedicalRecords>,
		@Param("vo")vo: SickMedicalRecordsSelectVo
	):Page<SickMedicalRecords>

	/**
	 * 列表
	 */
	fun getRecordsList(@Param("vo")vo: SickMedicalRecordsSelectVo):List<SickMedicalRecords>

	/**
	 * 获取今日就诊客户数量
	 */
	fun getTodayNewSickMedicalRecords(@Param("deptId") deptId:Long):Int

	/**
	 * 获取最后就诊记录(获取初诊信息用)
	 */
	fun getLastRecordByCustomerId(@Param("customerId") customerId:Long):SickMedicalRecords?
}
